<template>
  <component v-if="action"
    :is="getComponent(action.type, action.component)"
    v-bind="action.componentProps"
    :actionName="action.name"
    :seedName="seedName"
    :microName="microName"
  />
  <div v-else>没有【page】功能</div>
</template>
<script setup lang="ts">
  import { getActionByType } from '@/seed-application/utils/SeedUtil';
  import { getSeed, getComponent } from '@/seed-application'

  export type PropsType = { seedName: string, microName?: string }
  const props = defineProps<PropsType>()
  const seed = getSeed(props.seedName, props.microName)
  const action = getActionByType(seed, 'page')
</script>